import FontAwesome from '@expo/vector-icons/FontAwesome'
import { useFonts } from 'expo-font'
import { Slot, SplashScreen, Stack } from 'expo-router'
import { useEffect } from 'react'

export const unstable_settings = {
  // Ensure that reloading on `/modal` keeps a back button present.
  initialRouteName: 'index',
}

const RootLayout = () => {
  const [loaded, error] = useFonts({
    ...FontAwesome.font,
  })
  useEffect(() => {
    if (error) throw error
  }, [error])

  if (!loaded) {
    return null
  }

  return <Slot />

  // const uuid = null
  // if (!uuid) {
  //   return <Navigator />
  // }
  // return (
  //   <Stack
  //     screenOptions={{
  //       headerShown: false,
  //       animation: 'default',
  //     }}
  //   >
  //     <Stack.Screen name="(tabs)" options={{ headerShown: false }} />
  //     <Stack.Screen name="login" />
  //   </Stack>
  // )
}

export default RootLayout
